import { Game } from "./Game";

// 定义 GameManage 类
class GameManage {
    private games: Map<string, Game> = new Map<string, Game>();

    saveGame(roomId: string, game: Game) {
        this.games.set(roomId, game);
    }

    getGame(roomId: string): Game | undefined {
        return this.games.get(roomId);
    }

    removeGame(roomId: string) {
        this.games.delete(roomId);
    }
}
export default new GameManage();